import React from 'react';
import PropTypes from 'prop-types';
import {View, TouchableOpacity, Text, StyleSheet} from "react-native";

class MeHeader extends React.PureComponent {
    render() {
        return (
            <View style={styles.container}>
                <TouchableOpacity onPress={this.props.showLogin}>
                    <Text>登录</Text>
                </TouchableOpacity>
            </View>
        )
    }
}

const styles = StyleSheet.create({
    container: {
        padding        : 20,
        backgroundColor: '#eee'
    }
});

MeHeader.propTypes = {
    showLogin: PropTypes.func.isRequired
}

export default MeHeader